package mofei.concurrent.task;

import mofei.concurrent.utils.MapHolder;

import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.Callable;

public class MapForeach implements Callable<String> {


    @Override
    public String call() throws Exception {
//        MapHolder.map.forEach((key,value)->{
//            System.out.println(key+":"+value);
//        });
        Iterator iterator= MapHolder.map.keySet().iterator();
        while(iterator.hasNext()){
            Integer v=(Integer) iterator.next();
            System.out.println(v);
        }
        return null;
    }
}
